This page last changed on Feb 04, 2009 by stepheneb.

Ruby 1.8.6, 1.9, and JRuby running on Java 1.5, 1.6, and 1.7 compared

code: http://svn.concord.org/svn/projects/trunk/common/ruby/benchmarks/mergesort_benchmarks/

mergesort benchmark adapted from:

The measurements below are from running the mergesort test twice in sucession:

  Ruby version                time      speed *
------------------------------------------------
  1.8.6 patchlevel 114        9.33       0.42
  1.9 svn rev: 20339          3.90       1.0
                             
  Java 1.5                   
  jruby                       3.96       0.99
  jruby --server              3.00       1.30
  jruby --fast                3.34       1.17 *
  jruby --fast --server       2.42       1.61 *
                             
  Java 1.6                   
  jruby,                      1.85       2.10
  jruby --server,             1.90       2.06
  jruby --fast,               1.57       2.47 *
  jruby --fast --server,      1.67       2.34 *
                             
  Java 1.7                   
  jruby                       2.26       1.73
  jruby --server              2.06       1.90
  jruby --fast                2.04       1.91 *
  jruby --fast --server       1.75       2.23 *

  * speed normalized to Ruby 1.9, higher is better

  * running jruby with the '--fast' option is experimental 
    see: http://wiki.jruby.org/wiki/Performance_Tuning

Mergesort times

Cannot resolve external resource into attachment.

Mergesort speeds

Cannot resolve external resource into attachment.

Details

computer: MacBook Pro, 2.5GHz, 4GB memory, Mac OS X 10.5.6

Ruby 1.8.6: ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

Ruby 1.9: trunk: svn rev:20339 (Feb 2 2009)

JRuby: jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-02-04 rev 6586) [i386-java]

Java 1.5:
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Java 1.6:
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)

Java 1.7:
openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-stephen_2009_01_25_23_54-b00)
OpenJDK Server VM (build 14.0-b10, mixed mode)
Document generated by Confluence on Jan 27, 2014 16:56